package vistas;

import factory.JugadorFactory;
import factory.JugadorFactoryMethod;
import javax.swing.InputVerifier;
import javax.swing.JOptionPane;
import jugador.Jugador;

public class Principal extends javax.swing.JFrame {

    public Principal() {
        initComponents();
    }

    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        pnlTitulo = new javax.swing.JPanel();
        lblTitulo = new javax.swing.JLabel();
        pnlContenedor = new javax.swing.JPanel();
        pnlCaracteristicasJugador = new javax.swing.JPanel();
        lblHabilidadPortero = new javax.swing.JLabel();
        txtHabilidadPortero = new javax.swing.JTextField();
        lblCapacidadReaccion = new javax.swing.JLabel();
        txtCapacidadReaccion = new javax.swing.JTextField();
        lblFuerzaExplosiva = new javax.swing.JLabel();
        txtFuerzaExplosiva = new javax.swing.JTextField();
        lblVelocidadRegate = new javax.swing.JLabel();
        txtVelocidadRegate = new javax.swing.JTextField();
        lblVelocidadPunta = new javax.swing.JLabel();
        txtVelocidadPunta = new javax.swing.JTextField();
        lblEquilibrio = new javax.swing.JLabel();
        txtEquilibrio = new javax.swing.JTextField();
        lblResistencia = new javax.swing.JLabel();
        txtResistencia = new javax.swing.JTextField();
        lblPotenciaTiro = new javax.swing.JLabel();
        txtPotenciaTiro = new javax.swing.JTextField();
        lblSalto = new javax.swing.JLabel();
        txtSalto = new javax.swing.JTextField();
        lblResistenciaLesiones = new javax.swing.JLabel();
        txtResistenciaLesiones = new javax.swing.JTextField();
        lblActitudDefensiva = new javax.swing.JLabel();
        txtActitudDefensiva = new javax.swing.JTextField();
        lblActitudOfensiva = new javax.swing.JLabel();
        txtActitudOfensiva = new javax.swing.JTextField();
        lblRegularidad = new javax.swing.JLabel();
        txtRegularidad = new javax.swing.JTextField();
        lblFortalezaMental = new javax.swing.JLabel();
        txtFortalezaMental = new javax.swing.JTextField();
        lblJuegoEquipo = new javax.swing.JLabel();
        txtJuegoEquipo = new javax.swing.JTextField();
        jLabel2 = new javax.swing.JLabel();
        pnlComportamientosJugador = new javax.swing.JPanel();
        chbCazagoles = new javax.swing.JCheckBox();
        chbSenuelo = new javax.swing.JCheckBox();
        chbDiezClasico = new javax.swing.JCheckBox();
        chbDestructor = new javax.swing.JCheckBox();
        chbReferente = new javax.swing.JCheckBox();
        chbInstigador = new javax.swing.JCheckBox();
        chbJugadorSolido = new javax.swing.JCheckBox();
        jLabel1 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        pnlBotones = new javax.swing.JPanel();
        btnCrearJugador = new javax.swing.JButton();
        btnLimpiarCampos = new javax.swing.JButton();
        btnCancelarAcciones = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
        setTitle("Modulo Creación de Jugadores - Pro Evolution Soccer");

        pnlTitulo.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        lblTitulo.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N
        lblTitulo.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        lblTitulo.setText("Pro Evolution Soccer");

        javax.swing.GroupLayout pnlTituloLayout = new javax.swing.GroupLayout(pnlTitulo);
        pnlTitulo.setLayout(pnlTituloLayout);
        pnlTituloLayout.setHorizontalGroup(
            pnlTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTituloLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlTituloLayout.setVerticalGroup(
            pnlTituloLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlTituloLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(lblTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );

        pnlContenedor.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        pnlCaracteristicasJugador.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        lblHabilidadPortero.setLabelFor(txtHabilidadPortero);
        lblHabilidadPortero.setText("Habilidad de Portero: ");

        txtHabilidadPortero.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtHabilidadPortero.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtHabilidadPortero.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtHabilidadPortero.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO HABILIDAD DE PORTERO, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtHabilidadPortero.getText().trim()) > 100) || (Integer.parseInt(txtHabilidadPortero.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO HABILIDAD DE PORTERO, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtHabilidadPortero.setSelectionStart(0);
                        txtHabilidadPortero.setSelectionEnd(txtHabilidadPortero.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtHabilidadPortero.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtHabilidadPorteroFocusGained(evt);
            }
        });

        lblCapacidadReaccion.setLabelFor(txtCapacidadReaccion);
        lblCapacidadReaccion.setText("Capacidad de Reacción: ");

        txtCapacidadReaccion.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtCapacidadReaccion.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtCapacidadReaccion.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtCapacidadReaccion.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO CAPACIDAD DE REACCIÓN, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtCapacidadReaccion.getText().trim()) > 100) || (Integer.parseInt(txtCapacidadReaccion.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO CAPACIDAD DE REACCIÓN, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtCapacidadReaccion.setSelectionStart(0);
                        txtCapacidadReaccion.setSelectionEnd(txtCapacidadReaccion.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtCapacidadReaccion.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtCapacidadReaccionFocusGained(evt);
            }
        });

        lblFuerzaExplosiva.setLabelFor(txtFuerzaExplosiva);
        lblFuerzaExplosiva.setText("Fuerza Explosiva: ");

        txtFuerzaExplosiva.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtFuerzaExplosiva.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtFuerzaExplosiva.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtFuerzaExplosiva.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO FUERZA EXPLOSIVA, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtFuerzaExplosiva.getText().trim()) > 100) || (Integer.parseInt(txtFuerzaExplosiva.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO FUERZA EXPLOSIVA, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtFuerzaExplosiva.setSelectionStart(0);
                        txtFuerzaExplosiva.setSelectionEnd(txtFuerzaExplosiva.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtFuerzaExplosiva.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtFuerzaExplosivaFocusGained(evt);
            }
        });

        lblVelocidadRegate.setLabelFor(txtVelocidadRegate);
        lblVelocidadRegate.setText("Velocidad de Regate: ");

        txtVelocidadRegate.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtVelocidadRegate.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVelocidadRegate.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtVelocidadRegate.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO VELOCIDAD DE REGATE, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtVelocidadRegate.getText().trim()) > 100) || (Integer.parseInt(txtVelocidadRegate.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO VELOCIDAD DE REGATE, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtVelocidadRegate.setSelectionStart(0);
                        txtVelocidadRegate.setSelectionEnd(txtVelocidadRegate.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtVelocidadRegate.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtVelocidadRegateFocusGained(evt);
            }
        });

        lblVelocidadPunta.setLabelFor(txtVelocidadPunta);
        lblVelocidadPunta.setText("Velocidad de Punta: ");

        txtVelocidadPunta.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtVelocidadPunta.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtVelocidadPunta.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtVelocidadPunta.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO VELOCIDAD DE PUNTA, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtVelocidadPunta.getText().trim()) > 100) || (Integer.parseInt(txtVelocidadPunta.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO VELOCIDAD DE PUNTA, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtVelocidadPunta.setSelectionStart(0);
                        txtVelocidadPunta.setSelectionEnd(txtVelocidadPunta.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtVelocidadPunta.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtVelocidadPuntaFocusGained(evt);
            }
        });

        lblEquilibrio.setLabelFor(txtEquilibrio);
        lblEquilibrio.setText("Equilibrio: ");

        txtEquilibrio.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtEquilibrio.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtEquilibrio.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtEquilibrio.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO EQUILIBRIO, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtEquilibrio.getText().trim()) > 100) || (Integer.parseInt(txtEquilibrio.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO EQUILIBRIO, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtEquilibrio.setSelectionStart(0);
                        txtEquilibrio.setSelectionEnd(txtEquilibrio.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtEquilibrio.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtEquilibrioFocusGained(evt);
            }
        });

        lblResistencia.setLabelFor(txtResistencia);
        lblResistencia.setText("Resistencia: ");

        txtResistencia.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtResistencia.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtResistencia.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtResistencia.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO VELOCIDAD DE RESISTENCIA, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtResistencia.getText().trim()) > 100) || (Integer.parseInt(txtResistencia.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO VELOCIDAD DE RESISTENCIA, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtResistencia.setSelectionStart(0);
                        txtResistencia.setSelectionEnd(txtResistencia.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtResistencia.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtResistenciaFocusGained(evt);
            }
        });

        lblPotenciaTiro.setLabelFor(txtPotenciaTiro);
        lblPotenciaTiro.setText("Potencia de Tiro: ");

        txtPotenciaTiro.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtPotenciaTiro.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtPotenciaTiro.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtPotenciaTiro.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO POTENCIA DE TIRO, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtPotenciaTiro.getText().trim()) > 100) || (Integer.parseInt(txtPotenciaTiro.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO POTENCIA DE TIRO, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtPotenciaTiro.setSelectionStart(0);
                        txtPotenciaTiro.setSelectionEnd(txtPotenciaTiro.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtPotenciaTiro.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtPotenciaTiroFocusGained(evt);
            }
        });

        lblSalto.setLabelFor(txtSalto);
        lblSalto.setText("Salto: ");

        txtSalto.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtSalto.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtSalto.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtSalto.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO SALTO, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtSalto.getText().trim()) > 100) || (Integer.parseInt(txtSalto.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO SALTO, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtSalto.setSelectionStart(0);
                        txtSalto.setSelectionEnd(txtSalto.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtSalto.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtSaltoFocusGained(evt);
            }
        });

        lblResistenciaLesiones.setLabelFor(txtResistenciaLesiones);
        lblResistenciaLesiones.setText("Resistencia a Lesiones: ");

        txtResistenciaLesiones.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtResistenciaLesiones.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtResistenciaLesiones.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtResistenciaLesiones.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO RESISTENCIA A LESIONES, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtResistenciaLesiones.getText().trim()) > 100) || (Integer.parseInt(txtResistenciaLesiones.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO RESISTENCIA A LESIONES, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtResistenciaLesiones.setSelectionStart(0);
                        txtResistenciaLesiones.setSelectionEnd(txtResistenciaLesiones.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtResistenciaLesiones.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtResistenciaLesionesFocusGained(evt);
            }
        });

        lblActitudDefensiva.setLabelFor(txtActitudDefensiva);
        lblActitudDefensiva.setText("Actitud Defensiva: ");

        txtActitudDefensiva.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtActitudDefensiva.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtActitudDefensiva.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtActitudDefensiva.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO ACTITUD DEFENSIVA, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtActitudDefensiva.getText().trim()) > 100) || (Integer.parseInt(txtActitudDefensiva.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO ACTITUD DEFENSIVA, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtActitudDefensiva.setSelectionStart(0);
                        txtActitudDefensiva.setSelectionEnd(txtActitudDefensiva.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtActitudDefensiva.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtActitudDefensivaFocusGained(evt);
            }
        });

        lblActitudOfensiva.setLabelFor(txtActitudOfensiva);
        lblActitudOfensiva.setText("Actitud Ofensiva: ");

        txtActitudOfensiva.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtActitudOfensiva.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtActitudOfensiva.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtActitudOfensiva.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO ACTITUD OFENSIVA, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtActitudOfensiva.getText().trim()) > 100) || (Integer.parseInt(txtActitudOfensiva.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO ACTITUD OFENSIVA, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtActitudOfensiva.setSelectionStart(0);
                        txtActitudOfensiva.setSelectionEnd(txtActitudOfensiva.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtActitudOfensiva.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtActitudOfensivaFocusGained(evt);
            }
        });

        lblRegularidad.setLabelFor(txtRegularidad);
        lblRegularidad.setText("Regularidad: ");

        txtRegularidad.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtRegularidad.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtRegularidad.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtRegularidad.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO REGULARIDAD, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtRegularidad.getText().trim()) > 100) || (Integer.parseInt(txtRegularidad.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO REGULARIDAD, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtRegularidad.setSelectionStart(0);
                        txtRegularidad.setSelectionEnd(txtRegularidad.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtRegularidad.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtRegularidadFocusGained(evt);
            }
        });

        lblFortalezaMental.setLabelFor(txtFortalezaMental);
        lblFortalezaMental.setText("Fortaleza Mental: ");

        txtFortalezaMental.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtFortalezaMental.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtFortalezaMental.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtFortalezaMental.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO FORTALEZA MENTAL, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtFortalezaMental.getText().trim()) > 100) || (Integer.parseInt(txtFortalezaMental.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO FORTALEZA MENTAL, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtFortalezaMental.setSelectionStart(0);
                        txtFortalezaMental.setSelectionEnd(txtFortalezaMental.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtFortalezaMental.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtFortalezaMentalFocusGained(evt);
            }
        });

        lblJuegoEquipo.setLabelFor(txtJuegoEquipo);
        lblJuegoEquipo.setText("Juego en Equipo: ");

        txtJuegoEquipo.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        txtJuegoEquipo.setHorizontalAlignment(javax.swing.JTextField.CENTER);
        txtJuegoEquipo.setInputVerifier(new InputVerifier() {    
            public boolean verify(javax.swing.JComponent input) {
                javax.swing.JTextField tf = (javax.swing.JTextField) input;
                boolean ban;
                if (txtJuegoEquipo.getText().trim().equals("")) {
                    JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO JUEGO EN EQUIPO, NO PUEDE QUEDAR VACIO", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                    ban = false;
                } else {
                    if ((Integer.parseInt(txtJuegoEquipo.getText().trim()) > 100) || (Integer.parseInt(txtJuegoEquipo.getText().trim()) < 0)) {
                        JOptionPane.showMessageDialog(null, "VERIFIQUE EL CAMPO JUEGO EN EQUIPO, SU VALOR DEBE ESTAR ENTRE 0 Y 100", "PRO EVOLUTION SOCCER - ERROR", JOptionPane.WARNING_MESSAGE);
                        txtJuegoEquipo.setSelectionStart(0);
                        txtJuegoEquipo.setSelectionEnd(txtJuegoEquipo.getText().trim().length());
                        ban = false;
                    } else {
                        ban = true;
                    }
                }
                return ban;
            }
        });
        txtJuegoEquipo.addFocusListener(new java.awt.event.FocusAdapter() {
            public void focusGained(java.awt.event.FocusEvent evt) {
                txtJuegoEquipoFocusGained(evt);
            }
        });

        jLabel2.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel2.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel2.setText("Características");

        javax.swing.GroupLayout pnlCaracteristicasJugadorLayout = new javax.swing.GroupLayout(pnlCaracteristicasJugador);
        pnlCaracteristicasJugador.setLayout(pnlCaracteristicasJugadorLayout);
        pnlCaracteristicasJugadorLayout.setHorizontalGroup(
            pnlCaracteristicasJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlCaracteristicasJugadorLayout.createSequentialGroup()
                .addGroup(pnlCaracteristicasJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(pnlCaracteristicasJugadorLayout.createSequentialGroup()
                        .addGroup(pnlCaracteristicasJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(pnlCaracteristicasJugadorLayout.createSequentialGroup()
                                .addContainerGap()
                                .addComponent(lblHabilidadPortero)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtHabilidadPortero, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblCapacidadReaccion)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtCapacidadReaccion, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblFuerzaExplosiva)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtFuerzaExplosiva, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblVelocidadRegate)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtVelocidadRegate, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlCaracteristicasJugadorLayout.createSequentialGroup()
                                .addGap(54, 54, 54)
                                .addComponent(lblVelocidadPunta)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtVelocidadPunta, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblEquilibrio)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtEquilibrio, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblResistencia)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtResistencia, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblPotenciaTiro)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtPotenciaTiro, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlCaracteristicasJugadorLayout.createSequentialGroup()
                                .addGap(44, 44, 44)
                                .addComponent(lblSalto)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtSalto, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblResistenciaLesiones)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtResistenciaLesiones, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblActitudDefensiva)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtActitudDefensiva, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblActitudOfensiva)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtActitudOfensiva, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(pnlCaracteristicasJugadorLayout.createSequentialGroup()
                                .addGap(112, 112, 112)
                                .addComponent(lblRegularidad)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtRegularidad, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblFortalezaMental)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                .addComponent(txtFortalezaMental, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(lblJuegoEquipo)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(txtJuegoEquipo, javax.swing.GroupLayout.PREFERRED_SIZE, 40, javax.swing.GroupLayout.PREFERRED_SIZE)))
                        .addGap(0, 2, Short.MAX_VALUE))
                    .addComponent(jLabel2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        pnlCaracteristicasJugadorLayout.setVerticalGroup(
            pnlCaracteristicasJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlCaracteristicasJugadorLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel2)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlCaracteristicasJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblHabilidadPortero)
                    .addComponent(txtHabilidadPortero, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblCapacidadReaccion)
                    .addComponent(txtCapacidadReaccion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblFuerzaExplosiva)
                    .addComponent(txtFuerzaExplosiva, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblVelocidadRegate)
                    .addComponent(txtVelocidadRegate, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlCaracteristicasJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblVelocidadPunta)
                    .addComponent(txtVelocidadPunta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblEquilibrio)
                    .addComponent(txtEquilibrio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblResistencia)
                    .addComponent(txtResistencia, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblPotenciaTiro)
                    .addComponent(txtPotenciaTiro, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlCaracteristicasJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblSalto)
                    .addComponent(txtSalto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblResistenciaLesiones)
                    .addComponent(txtResistenciaLesiones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblActitudDefensiva)
                    .addComponent(txtActitudDefensiva, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblActitudOfensiva)
                    .addComponent(txtActitudOfensiva, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlCaracteristicasJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblRegularidad)
                    .addComponent(txtRegularidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblFortalezaMental)
                    .addComponent(txtFortalezaMental, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(lblJuegoEquipo)
                    .addComponent(txtJuegoEquipo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
        );

        pnlComportamientosJugador.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        chbCazagoles.setText("Cazagoles");

        chbSenuelo.setText("Señuelo");

        chbDiezClasico.setText("Diez Clásico");

        chbDestructor.setText("Destructor");

        chbReferente.setText("Referente");

        chbInstigador.setText("Instigador");

        chbJugadorSolido.setText("Jugador Solido");

        jLabel1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N
        jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel1.setText("Comportamientos");

        javax.swing.GroupLayout pnlComportamientosJugadorLayout = new javax.swing.GroupLayout(pnlComportamientosJugador);
        pnlComportamientosJugador.setLayout(pnlComportamientosJugadorLayout);
        pnlComportamientosJugadorLayout.setHorizontalGroup(
            pnlComportamientosJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlComportamientosJugadorLayout.createSequentialGroup()
                .addGap(21, 21, 21)
                .addComponent(chbCazagoles)
                .addGap(10, 10, 10)
                .addComponent(chbSenuelo)
                .addGap(10, 10, 10)
                .addComponent(chbDiezClasico)
                .addGap(10, 10, 10)
                .addComponent(chbDestructor)
                .addGap(10, 10, 10)
                .addComponent(chbReferente)
                .addGap(10, 10, 10)
                .addComponent(chbInstigador)
                .addGap(10, 10, 10)
                .addComponent(chbJugadorSolido)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
            .addGroup(pnlComportamientosJugadorLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addContainerGap())
        );
        pnlComportamientosJugadorLayout.setVerticalGroup(
            pnlComportamientosJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlComportamientosJugadorLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jLabel1)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(pnlComportamientosJugadorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(chbCazagoles)
                    .addComponent(chbSenuelo)
                    .addComponent(chbDiezClasico)
                    .addComponent(chbDestructor)
                    .addComponent(chbReferente)
                    .addComponent(chbInstigador)
                    .addComponent(chbJugadorSolido))
                .addContainerGap())
        );

        jLabel3.setFont(new java.awt.Font("Tahoma", 1, 18)); // NOI18N
        jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        jLabel3.setText("Creación de Jugadores");

        javax.swing.GroupLayout pnlContenedorLayout = new javax.swing.GroupLayout(pnlContenedor);
        pnlContenedor.setLayout(pnlContenedorLayout);
        pnlContenedorLayout.setHorizontalGroup(
            pnlContenedorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlContenedorLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlContenedorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlCaracteristicasJugador, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlComportamientosJugador, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jLabel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        pnlContenedorLayout.setVerticalGroup(
            pnlContenedorLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlContenedorLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(pnlCaracteristicasJugador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlComportamientosJugador, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pnlBotones.setBorder(javax.swing.BorderFactory.createEtchedBorder());

        btnCrearJugador.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        btnCrearJugador.setMnemonic('J');
        btnCrearJugador.setText("Crear Jugador");
        btnCrearJugador.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCrearJugadorActionPerformed(evt);
            }
        });

        btnLimpiarCampos.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        btnLimpiarCampos.setMnemonic('L');
        btnLimpiarCampos.setText("Limpiar Campos");
        btnLimpiarCampos.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnLimpiarCamposActionPerformed(evt);
            }
        });

        btnCancelarAcciones.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N
        btnCancelarAcciones.setMnemonic('C');
        btnCancelarAcciones.setText("Cancelar Acciones");
        btnCancelarAcciones.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCancelarAccionesActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout pnlBotonesLayout = new javax.swing.GroupLayout(pnlBotones);
        pnlBotones.setLayout(pnlBotonesLayout);
        pnlBotonesLayout.setHorizontalGroup(
            pnlBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, pnlBotonesLayout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(btnCrearJugador, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnLimpiarCampos, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(18, 18, 18)
                .addComponent(btnCancelarAcciones, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(88, 88, 88))
        );
        pnlBotonesLayout.setVerticalGroup(
            pnlBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(pnlBotonesLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(pnlBotonesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
                    .addComponent(btnLimpiarCampos)
                    .addComponent(btnCrearJugador)
                    .addComponent(btnCancelarAcciones))
                .addContainerGap())
        );

        btnCrearJugador.getAccessibleContext().setAccessibleName("");
        btnLimpiarCampos.getAccessibleContext().setAccessibleName("");
        btnCancelarAcciones.getAccessibleContext().setAccessibleName("");

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addComponent(pnlTitulo, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlContenedor, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(pnlBotones, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(pnlTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlContenedor, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(pnlBotones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );

        pack();
        setLocationRelativeTo(null);
    }// </editor-fold>//GEN-END:initComponents

    private void btnCrearJugadorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCrearJugadorActionPerformed
        JugadorFactoryMethod factory = new JugadorFactory();

         int habilidadPortero = Integer.parseInt(txtHabilidadPortero.getText().trim());
         int capacidadReaccion = Integer.parseInt(txtCapacidadReaccion.getText().trim());
         int fuerzaExplosiva = Integer.parseInt(txtFuerzaExplosiva.getText().trim());
         int velocidadRegate = Integer.parseInt(txtVelocidadRegate.getText().trim());
         int velocidadPunta = Integer.parseInt(txtVelocidadPunta.getText().trim());
         int equilibrio = Integer.parseInt(txtEquilibrio.getText().trim());
         int resistencia = Integer.parseInt(txtResistencia.getText().trim());
         int potenciaTiro = Integer.parseInt(txtPotenciaTiro.getText().trim());
         int salto = Integer.parseInt(txtSalto.getText().trim());
         int resistenciaLesiones = Integer.parseInt(txtResistenciaLesiones.getText().trim());
         int actitudDefensiva = Integer.parseInt(txtActitudDefensiva.getText().trim());
         int actitudOfensiva = Integer.parseInt(txtActitudOfensiva.getText().trim());
         int regularidad = Integer.parseInt(txtRegularidad.getText().trim());
         int fortalezaMental = Integer.parseInt(txtFortalezaMental.getText().trim());
         int juegoEquipo = Integer.parseInt(txtJuegoEquipo.getText().trim());

         boolean cazagoles = chbCazagoles.isSelected();
         boolean senuelo = chbSenuelo.isSelected();
         boolean diezClasico = chbDiezClasico.isSelected();
         boolean destructor = chbDestructor.isSelected();
         boolean referente = chbReferente.isSelected();
         boolean instigador = chbInstigador.isSelected();
         boolean jugadorSolido = chbJugadorSolido.isSelected();

         Jugador jugador = factory.crearJugador(habilidadPortero, capacidadReaccion, fuerzaExplosiva, velocidadRegate, velocidadPunta, equilibrio, resistencia, potenciaTiro, salto, resistenciaLesiones, actitudDefensiva, actitudOfensiva, regularidad, fortalezaMental, juegoEquipo, cazagoles, senuelo, diezClasico, destructor, referente, instigador, jugadorSolido);

         JOptionPane.showMessageDialog(this, jugador.getTipoJugador() + " " + jugador.getCaracteristicas() + " " + jugador.getComportamientos(), "PRO EVOLUTION SOCCER - " + jugador.getTipoJugador(), JOptionPane.INFORMATION_MESSAGE);
    }//GEN-LAST:event_btnCrearJugadorActionPerformed

    private void btnCancelarAccionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCancelarAccionesActionPerformed
        System.exit(0);
    }//GEN-LAST:event_btnCancelarAccionesActionPerformed

    private void txtHabilidadPorteroFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtHabilidadPorteroFocusGained
        if (txtHabilidadPortero.getText().trim().length() > 0) {
            txtHabilidadPortero.setSelectionStart(0);
            txtHabilidadPortero.setSelectionEnd(txtHabilidadPortero.getText().trim().length());
        }
    }//GEN-LAST:event_txtHabilidadPorteroFocusGained

    private void txtCapacidadReaccionFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtCapacidadReaccionFocusGained
        if (txtCapacidadReaccion.getText().trim().length() > 0) {
            txtCapacidadReaccion.setSelectionStart(0);
            txtCapacidadReaccion.setSelectionEnd(txtCapacidadReaccion.getText().trim().length());
        }
    }//GEN-LAST:event_txtCapacidadReaccionFocusGained

    private void txtFuerzaExplosivaFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtFuerzaExplosivaFocusGained
        if (txtFuerzaExplosiva.getText().trim().length() > 0) {
            txtFuerzaExplosiva.setSelectionStart(0);
            txtFuerzaExplosiva.setSelectionEnd(txtFuerzaExplosiva.getText().trim().length());
        }
    }//GEN-LAST:event_txtFuerzaExplosivaFocusGained

    private void txtVelocidadRegateFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtVelocidadRegateFocusGained
        if (txtVelocidadRegate.getText().trim().length() > 0) {
            txtVelocidadRegate.setSelectionStart(0);
            txtVelocidadRegate.setSelectionEnd(txtVelocidadRegate.getText().trim().length());
        }
    }//GEN-LAST:event_txtVelocidadRegateFocusGained

    private void txtVelocidadPuntaFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtVelocidadPuntaFocusGained
        if (txtVelocidadPunta.getText().trim().length() > 0) {
            txtVelocidadPunta.setSelectionStart(0);
            txtVelocidadPunta.setSelectionEnd(txtVelocidadPunta.getText().trim().length());
        }
    }//GEN-LAST:event_txtVelocidadPuntaFocusGained

    private void txtEquilibrioFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtEquilibrioFocusGained
        if (txtEquilibrio.getText().trim().length() > 0) {
            txtEquilibrio.setSelectionStart(0);
            txtEquilibrio.setSelectionEnd(txtEquilibrio.getText().trim().length());
        }
    }//GEN-LAST:event_txtEquilibrioFocusGained

    private void txtResistenciaFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtResistenciaFocusGained
        if (txtResistencia.getText().trim().length() > 0) {
            txtResistencia.setSelectionStart(0);
            txtResistencia.setSelectionEnd(txtResistencia.getText().trim().length());
        }
    }//GEN-LAST:event_txtResistenciaFocusGained

    private void txtPotenciaTiroFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtPotenciaTiroFocusGained
        if (txtPotenciaTiro.getText().trim().length() > 0) {
            txtPotenciaTiro.setSelectionStart(0);
            txtPotenciaTiro.setSelectionEnd(txtPotenciaTiro.getText().trim().length());
        }
    }//GEN-LAST:event_txtPotenciaTiroFocusGained

    private void txtSaltoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtSaltoFocusGained
        if (txtSalto.getText().trim().length() > 0) {
            txtSalto.setSelectionStart(0);
            txtSalto.setSelectionEnd(txtSalto.getText().trim().length());
        }
    }//GEN-LAST:event_txtSaltoFocusGained

    private void txtResistenciaLesionesFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtResistenciaLesionesFocusGained
        if (txtResistenciaLesiones.getText().trim().length() > 0) {
            txtResistenciaLesiones.setSelectionStart(0);
            txtResistenciaLesiones.setSelectionEnd(txtResistenciaLesiones.getText().trim().length());
        }
    }//GEN-LAST:event_txtResistenciaLesionesFocusGained

    private void txtActitudDefensivaFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtActitudDefensivaFocusGained
        if (txtActitudDefensiva.getText().trim().length() > 0) {
            txtActitudDefensiva.setSelectionStart(0);
            txtActitudDefensiva.setSelectionEnd(txtActitudDefensiva.getText().trim().length());
        }
    }//GEN-LAST:event_txtActitudDefensivaFocusGained

    private void txtActitudOfensivaFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtActitudOfensivaFocusGained
        if (txtActitudOfensiva.getText().trim().length() > 0) {
            txtActitudOfensiva.setSelectionStart(0);
            txtActitudOfensiva.setSelectionEnd(txtActitudOfensiva.getText().trim().length());
        }
    }//GEN-LAST:event_txtActitudOfensivaFocusGained

    private void txtRegularidadFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtRegularidadFocusGained
        if (txtRegularidad.getText().trim().length() > 0) {
            txtRegularidad.setSelectionStart(0);
            txtRegularidad.setSelectionEnd(txtRegularidad.getText().trim().length());
        }
    }//GEN-LAST:event_txtRegularidadFocusGained

    private void txtFortalezaMentalFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtFortalezaMentalFocusGained
        if (txtFortalezaMental.getText().trim().length() > 0) {
            txtFortalezaMental.setSelectionStart(0);
            txtFortalezaMental.setSelectionEnd(txtFortalezaMental.getText().trim().length());
        }
    }//GEN-LAST:event_txtFortalezaMentalFocusGained

    private void txtJuegoEquipoFocusGained(java.awt.event.FocusEvent evt) {//GEN-FIRST:event_txtJuegoEquipoFocusGained
        if (txtJuegoEquipo.getText().trim().length() > 0) {
            txtJuegoEquipo.setSelectionStart(0);
            txtJuegoEquipo.setSelectionEnd(txtJuegoEquipo.getText().trim().length());
        }
    }//GEN-LAST:event_txtJuegoEquipoFocusGained

    private void btnLimpiarCamposActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnLimpiarCamposActionPerformed
        txtHabilidadPortero.setText("");;
        txtCapacidadReaccion.setText("");;
        txtFuerzaExplosiva.setText("");;
        txtVelocidadRegate.setText("");;
        txtVelocidadPunta.setText("");;
        txtEquilibrio.setText("");;
        txtResistencia.setText("");;
        txtPotenciaTiro.setText("");;
        txtSalto.setText("");;
        txtResistenciaLesiones.setText("");;
        txtActitudDefensiva.setText("");;
        txtActitudOfensiva.setText("");;
        txtRegularidad.setText("");;
        txtFortalezaMental.setText("");;
        txtJuegoEquipo.setText("");;

        chbCazagoles.setSelected(false);
        chbSenuelo.setSelected(false);
        chbDiezClasico.setSelected(false);
        chbDestructor.setSelected(false);
        chbReferente.setSelected(false);
        chbInstigador.setSelected(false);
        chbJugadorSolido.setSelected(false);
    }//GEN-LAST:event_btnLimpiarCamposActionPerformed

    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Principal.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the form */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                Principal principal = new Principal();
                principal.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnCancelarAcciones;
    private javax.swing.JButton btnCrearJugador;
    private javax.swing.JButton btnLimpiarCampos;
    private javax.swing.JCheckBox chbCazagoles;
    private javax.swing.JCheckBox chbDestructor;
    private javax.swing.JCheckBox chbDiezClasico;
    private javax.swing.JCheckBox chbInstigador;
    private javax.swing.JCheckBox chbJugadorSolido;
    private javax.swing.JCheckBox chbReferente;
    private javax.swing.JCheckBox chbSenuelo;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel lblActitudDefensiva;
    private javax.swing.JLabel lblActitudOfensiva;
    private javax.swing.JLabel lblCapacidadReaccion;
    private javax.swing.JLabel lblEquilibrio;
    private javax.swing.JLabel lblFortalezaMental;
    private javax.swing.JLabel lblFuerzaExplosiva;
    private javax.swing.JLabel lblHabilidadPortero;
    private javax.swing.JLabel lblJuegoEquipo;
    private javax.swing.JLabel lblPotenciaTiro;
    private javax.swing.JLabel lblRegularidad;
    private javax.swing.JLabel lblResistencia;
    private javax.swing.JLabel lblResistenciaLesiones;
    private javax.swing.JLabel lblSalto;
    private javax.swing.JLabel lblTitulo;
    private javax.swing.JLabel lblVelocidadPunta;
    private javax.swing.JLabel lblVelocidadRegate;
    private javax.swing.JPanel pnlBotones;
    private javax.swing.JPanel pnlCaracteristicasJugador;
    private javax.swing.JPanel pnlComportamientosJugador;
    private javax.swing.JPanel pnlContenedor;
    private javax.swing.JPanel pnlTitulo;
    private javax.swing.JTextField txtActitudDefensiva;
    private javax.swing.JTextField txtActitudOfensiva;
    private javax.swing.JTextField txtCapacidadReaccion;
    private javax.swing.JTextField txtEquilibrio;
    private javax.swing.JTextField txtFortalezaMental;
    private javax.swing.JTextField txtFuerzaExplosiva;
    private javax.swing.JTextField txtHabilidadPortero;
    private javax.swing.JTextField txtJuegoEquipo;
    private javax.swing.JTextField txtPotenciaTiro;
    private javax.swing.JTextField txtRegularidad;
    private javax.swing.JTextField txtResistencia;
    private javax.swing.JTextField txtResistenciaLesiones;
    private javax.swing.JTextField txtSalto;
    private javax.swing.JTextField txtVelocidadPunta;
    private javax.swing.JTextField txtVelocidadRegate;
    // End of variables declaration//GEN-END:variables
}
